************************************************************************************************************
* Keeping Vigil: The Emergence of Vigilance Committees in Pre-Civil War America.  *
* Jonathan Obert & Eleonora Mattiacci                                             *
* Last modified: January 31, 2018   
************************************************************************************************************

************************************************************************************************************
* Code to replicate Table 5,  in the Appendix                                       *
* The analysis was carried out on Stata v 14.2 on a 3.5 GHz Intel Core i7 running OS Sierra 10.12.6        *
************************************************************************************************************

*use "/Users/emattiacci/Dropbox/Vigilantism_Paper2/Multiple Imputations 2017/outdataARR.dta", clear

*Set the working directory
cd  ""
*Load data
use "MI.dta", clear

set seed 123

mi import flong, m(blah) id(active_year fips) imputed(ethnic_frac_2NA gini_1850_2NA manufacturing_2NA slavery_2NA border_revision_2year)


mi passive: generate interaction2 = ethnic_frac_2NA*border_revision_2yeardum
mi stset seq, failure(committee==1) id(fips)

***Code to replicate Model 1, Table 5, in the Appendix
mi estimate: stcox ethnic_frac_2NA border_revision_2yeardum interaction2, nohr vce(cluster fips) efron 
***Code to replicate Model 2, Table 5, in the Appendix

mi estimate: stcox ethnic_frac_2NA border_revision_2yeardum interaction2 gini_1850_2NA manufacturing_2NA urbanization_2NA slavery_2NA, nohr vce(cluster fips) efron 

